DXL Challenge: Layout displays Change Bars

We have several modules that don't use the Main column. We want to see the Change Bars, but they only show on the main column.

Can someone write a layout to display the change bars?

  • Louie

llandale - Thu Feb 04 11:23:26 EST 2010

Re: DXL Challenge: Layout displays Change Bars
jsarkic - Thu Feb 04 13:28:42 EST 2010

Instead of writing code, you can insert the Main column, and resize it to its minimum width. This will allow you to see the change bars, and link indicators.

Re: DXL Challenge: Layout displays Change Bars
kbmurphy - Thu Feb 04 13:40:55 EST 2010

jsarkic - Thu Feb 04 13:28:42 EST 2010
Instead of writing code, you can insert the Main column, and resize it to its minimum width. This will allow you to see the change bars, and link indicators.

I have to second that. You could write a script that inserts the main column with a width of 1 or 2 or something. Make it a menu item and people can add it to their view easily.

Re: DXL Challenge: Layout displays Change Bars
llandale - Thu Feb 04 16:34:58 EST 2010

jsarkic - Thu Feb 04 13:28:42 EST 2010
Instead of writing code, you can insert the Main column, and resize it to its minimum width. This will allow you to see the change bars, and link indicators.

This worked:

Column cCurr = column(getSelectedCol(current Module))
Column cNew = insert(cCurr)
 
main(cNew)
width(cNew, 6)   // Best width seems to be '6', I guess Pixels

 


But there is info in the Text, and now that column is way to Deep, taking up half the page.

 

 

 

  • Louie

 

 

Re: DXL Challenge: Layout displays Change Bars
kbmurphy - Thu Feb 04 18:06:46 EST 2010

llandale - Thu Feb 04 16:34:58 EST 2010

This worked:

Column cCurr = column(getSelectedCol(current Module))
Column cNew = insert(cCurr)
 
main(cNew)
width(cNew, 6)   // Best width seems to be '6', I guess Pixels

 


But there is info in the Text, and now that column is way to Deep, taking up half the page.

 

 

 

  • Louie

 

 

Maybe we should create an Enhancement Request just to insert a change bar without the main column.

Re: DXL Challenge: Layout displays Change Bars
Mathias Mamsch - Fri Feb 05 04:15:22 EST 2010

kbmurphy - Thu Feb 04 18:06:46 EST 2010
Maybe we should create an Enhancement Request just to insert a change bar without the main column.

You can use the existing perms to show the change bars:

bool modified (Object) will return true if the object was modified since the last baseline

for a section you can use

since DOORS 8.3 you can use the

bool saved (Object) and bool unsaved (Object) to check if the object has unsaved changes.

This way you should be able to show the change bars.

Regards, Mathias

Re: DXL Challenge: Layout displays Change Bars
jsarkic - Fri Feb 05 08:15:32 EST 2010

Mathias Mamsch - Fri Feb 05 04:15:22 EST 2010
You can use the existing perms to show the change bars:

bool modified (Object) will return true if the object was modified since the last baseline

for a section you can use

since DOORS 8.3 you can use the

bool saved (Object) and bool unsaved (Object) to check if the object has unsaved changes.

This way you should be able to show the change bars.

Regards, Mathias

You can simulate the changebars. Here is a starting point for you. Create a DXL Layout column and insert the following code.

{code

DBE can = getCanvas()

if (unsaved obj)
realBackground(can, realColor_Red)
else if (modified obj)
realBackground(can, realColor_Yellow)
else
realBackground(can, realColor_Green)

}

Re: DXL Challenge: Layout displays Change Bars
kbmurphy - Fri Feb 05 12:46:39 EST 2010

jsarkic - Fri Feb 05 08:15:32 EST 2010
You can simulate the changebars. Here is a starting point for you. Create a DXL Layout column and insert the following code.

{code

DBE can = getCanvas()

if (unsaved obj)
realBackground(can, realColor_Red)
else if (modified obj)
realBackground(can, realColor_Yellow)
else
realBackground(can, realColor_Green)

}

I would recommend changing realColor_Green to realColor_Blue for DOORS 9 and above. Colorblind people have a hard time seeing green...

Re: DXL Challenge: Layout displays Change Bars
llandale - Sun Feb 07 02:07:32 EST 2010

jsarkic - Fri Feb 05 08:15:32 EST 2010
You can simulate the changebars. Here is a starting point for you. Create a DXL Layout column and insert the following code.

{code

DBE can = getCanvas()

if (unsaved obj)
realBackground(can, realColor_Red)
else if (modified obj)
realBackground(can, realColor_Yellow)
else
realBackground(can, realColor_Green)

}

Bingo!! Thanks

The 'deploy' code looks like this, since it seems you can use DXL to create a column thinner than you can with the mouse and the GUI:
 

string DXL_Code = "
DBE can = getCanvas()
if (unsaved obj)
     realBackground(can, realColor_Red)
elseif (modified obj)
     realBackground(can, realColor_Yellow)
else realBackground(can, realColor_Blue)
"
 
Column cCurr = column(getSelectedCol(current Module))
Column cNew = insert(cCurr)
 
dxl(cNew, DXL_Code)
width(cNew, 6)   // Best width seems to be '6', I guess Pixels

 

 

  • Louie

 

 

Re: DXL Challenge: Layout displays Change Bars
llandale - Mon Jun 28 10:20:47 EDT 2010

llandale - Sun Feb 07 02:07:32 EST 2010

Bingo!! Thanks

The 'deploy' code looks like this, since it seems you can use DXL to create a column thinner than you can with the mouse and the GUI:
 

string DXL_Code = "
DBE can = getCanvas()
if (unsaved obj)
     realBackground(can, realColor_Red)
elseif (modified obj)
     realBackground(can, realColor_Yellow)
else realBackground(can, realColor_Blue)
"
 
Column cCurr = column(getSelectedCol(current Module))
Column cNew = insert(cCurr)
 
dxl(cNew, DXL_Code)
width(cNew, 6)   // Best width seems to be '6', I guess Pixels

 

 

  • Louie

 

 

Must check for null 'can'; 'new' object, 'deleted' object, and I chose to change the color when the section is locked and needs changed (pink).

DBE    can = getCanvas() 
int     BackColor
if (null can)
{}        // cannot color canvas
else
{  elseif(unsaved(obj) or new(obj))
        BackColor       = realColor_Red                 // Modified not yet saved
   elseif(isDeleted(obj))
        BackColor       = realColor_Black               // Deleted Object
   elseif(sectionNeedsSaved(obj) and isLockedByUser(obj))
        BackColor       = realColor_Pink                // Section locked and modified
   elseif (saved(obj))
        BackColor       = realColor_Yellow              // modified since Baseline or module create
   else BackColor       = realColor_Blue                // not modified since baseline
   realBackground(can, BackColor)
}


The colors are not right; too strong compared to the soft colors of the actual change bars. There seems to be 36 'real' colors and none work. I had no luck using 'logical' colors and 'background()'. Any ideas?

Am adding static 'link indicators' to this canvas, will post full code when its done.

 

 

  • Louie

 

 

Re: DXL Challenge: Layout displays Change Bars
PDU - Tue Jun 29 02:36:55 EDT 2010

llandale - Sun Feb 07 02:07:32 EST 2010

Bingo!! Thanks

The 'deploy' code looks like this, since it seems you can use DXL to create a column thinner than you can with the mouse and the GUI:
 

string DXL_Code = "
DBE can = getCanvas()
if (unsaved obj)
     realBackground(can, realColor_Red)
elseif (modified obj)
     realBackground(can, realColor_Yellow)
else realBackground(can, realColor_Blue)
"
 
Column cCurr = column(getSelectedCol(current Module))
Column cNew = insert(cCurr)
 
dxl(cNew, DXL_Code)
width(cNew, 6)   // Best width seems to be '6', I guess Pixels

 

 

  • Louie

 

 

Hi,

perhaps you can add an other case :
deleted , with black color.

Pierre